<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=7" />
	<title>“半价汇”广告管理系统</title>
	<!-- Reset Stylesheet -->
	<link rel="stylesheet" href="static/css/reset.css" type="text/css" media="screen" />
  
	<!-- Main Stylesheet -->
	<link rel="stylesheet" href="static/css/style.css" type="text/css" media="screen" />
	
	<!-- Invalid Stylesheet. This makes stuff look pretty. Remove it if you want the CSS completely valid -->
	<link rel="stylesheet" href="static/css/invalid.css" type="text/css" media="screen" />	
	<link rel="stylesheet" type="text/css" media="screen" href="static/css//datePicker.css">

	<script type="text/javascript" src="static/js/jquery.min.js"></script>
	<!-- jQuery Configuration -->
	<script type="text/javascript" src="static/js/simpla.jquery.configuration.js"></script>

	<script type="text/javascript" src="static/js/date.js"></script>
	<script type="text/javascript" src="static/js/jquery.datePicker.js"></script>
</head>
<style>
/* located in demo.css and creates a little calendar icon
 * instead of a text link for "Choose date"
 */
a.dp-choose-date {
	float: left;
	width: 16px;
	height: 16px;
	padding: 0;
	margin: 5px 3px 0;
	display: block;
	text-indent: -2000px;
	overflow: hidden;
	background: url(static/images/calendar.png) no-repeat; 
}
a.dp-choose-date.dp-disabled {
	background-position: 0 -20px;
	cursor: default;
}
/* makes the input field shorter once the date picker code
 * has run (to allow space for the calendar icon
 */
input.dp-applied {
	width: 140px;
	float: left;
}
</style>
<body>
	<div id="body-wrapper">
		<?php include 'admin_sidebar.html'; ?>
		<div id="main-content">
			<div class="content-box">
				<div class="content-box-header">
					<h3>广告回收站</h3>
					<div class="clear"></div>
				</div> <!-- End .content-box-header -->
				
				<div class="content-box-content">
				<table cellpadding="10" cellspacing="10" class="" width="100%">
					<thead>
					<tr>
						<th>名称</th>
						<th>开始截止时间</th>
						<th>链接</th>
						<th width="20%">操作</th>
					</tr>
					</thead>
					<?php foreach($results as $k=>$v) { ?>
					<tr>
						<td align="center"><?php echo $v['title'];?></td>
						<td align="center"><?php echo $v['startdate'];?>~<?php echo $v['enddate'];?></td>
						<td align="center"><a href="<?php echo $v['url'];?>" target="_blank"><?php echo substr($v['url'], 0, 100);?></a></td>
						<td align="center">
							<a href="<?php echo spUrl('admin', 'recover', array('pid'=>$v['pid']));?>">恢复</a>
						</td>
					</tr>
					<?php } ?>
					<tfoot>
						<tr>
							<td colspan="6">
							<div class="pagination">
								<div class="page-bottom tp">
									<?php if($pager[current_page] == $pager[first_page]) {?>
									<span class="page-start"><span><b class="icon"></b>上一页</span></span>
									<?php } else { ?>
									<a href="<?php echo spUrl('admin', $a, array('page'=>$pager[prev_page])); ?>" class="page-prev"><b class="icon"></b>上一页</a>
									<?php } ?>
									<?php foreach($pager[all_pages] as $thepage) {?>
									<?php if($thepage == $pager[current_page]) {?>
									<span class="page-cur"><?php echo $thepage; ?></span>
									<?php } else { ?>
									<a href="<?php echo spUrl('admin', $a,  array('page'=>$thepage)); ?>" class="number"><?php echo $thepage; ?></a>
									<?php }} ?>
									<?php if($pager[current_page] == $pager[last_page]) {?>
									<span class="page-end"><b class="icon"></b>下一页</span>
									<?php } else { ?>
									<a href="<?php echo spUrl('admin', $a, array('page'=>$pager[next_page])); ?>" class="page-next">下一页<b class="icon"></b></a>
									<?php } ?>
								</div>
							</div>
							<div class="clear"></div>
							</td>
						</tr>
					</tfoot>
				</table>
				</div>
			</div>
		</div>
	</div>
</body>
</html>